package com.boc.ewr.cornJob;

import com.boc.ewr.business.service.IAcctDtlClassA2Service;
import com.boc.ewr.business.service.IAcctDtlClassA3Service;
import com.boc.ewr.business.service.IAcctUncaDtlService;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.DateUtils;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import java.math.BigDecimal;

/**
 * @author : Wzz
 * @create : 2023-04- 20- 15:12
 * @desc :账户分类-A3类账户明细-生成
 */
@Slf4j
public class AcctA3GenJob implements Job {


    @Autowired
    private IAcctDtlClassA3Service acctDtlClassA3Service;

    /**
     * A3类账户：每季度（3、6、9、12）初(y-3)在未对账账户明细中抓取非重点账单账户,
     * 去掉D类（D1、D2、D3）账户后，筛选余额≥10万的账户形成A3类账户明细。
     * */
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info(" Job Execution key：" + jobExecutionContext.getJobDetail().getKey());
        log.info(String.format(" A3类账户明细生成 AcctA3GenJob 时间:" + DateUtils.getTimestamp()));

        acctDtlClassA3Service.createInfo();
    }
}
